<template>
  <view class="content">
    <view>
      <view>{{color}}</view>
      <button @click="show = true">选择颜色</button>
    </view>
    <HadaColorPicker v-model="show" @change="change" @confirm="confirm"></HadaColorPicker>
  </view>
</template>

<script setup lang="ts">
import HadaColorPicker from "./components/hada-color-picker/HadaColorPicker.vue";
import {ref} from "vue";

const show = ref(false);
const color = ref('#FF0000');
const change = (e) => {
  console.log('change', e)
  color.value = e;
}

const confirm = (e) => {
  console.log('confirm', e)
  color.value = e;
}



</script>

<style lang="scss">
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30rpx;

  .hadaCanvasPoster {
    flex: 1;
    width: 600rpx;
    padding: 30rpx;
  }
}
</style>
